/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function saveGroupPlan() {
    Ext.Ajax.request({
        url:'groupplan.do?action=saveGroupPlan',
        method:'post',
        jsonData: JSON.stringify(groupplan),

        success:function(response){

            var responseArray = Ext.util.JSON.decode(response.responseText);
            if(responseArray.success==true){
                    Ext.Msg.alert('Information','Save plan success!', function(){
                        window.location.href="PersonalSpace.jsp?userid="+userid;
                    });
            }
            else{
                  Ext.Msg.alert('information','Save plan failed!');
            }
        },

        failure:function(action){
            alert('failed');
            Ext.Msg.alert('Error', 'Reason\uff1a' + action.result.errors.info);
        }
    });
}